/* ================================
   【日志管理菜单】相关样式
   ================================ */
.log-container {
  height: 70vh;
  overflow-y: auto;
  background-color: var(--gray-900);
  color: var(--gray-100);
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Source Code Pro', monospace;
  font-size: 13px;
  line-height: 1.4;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  position: relative;
}

.log-entry {
  margin-bottom: 0;
  padding: 2px 0;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.4;
  transition: var(--transition-fast);
}

.log-entry:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  margin: 0 -8px;
}

.log-entry.DEBUG {
  color: #9cdcfe;
}

.log-entry.INFO {
  color: #4ec9b0;
}

.log-entry.WARNING {
  color: #dcdcaa;
}

.log-entry.ERROR {
  color: #f48771;
  background-color: rgba(244, 135, 113, 0.1);
  border-left: 3px solid #f48771;
  padding-left: 12px;
  margin-left: -15px;
}

.log-entry.CRITICAL {
  color: #ff6b6b;
  font-weight: bold;
  background-color: rgba(255, 107, 107, 0.15);
  border-left: 3px solid #ff6b6b;
  padding-left: 12px;
  margin-left: -15px;
}

.log-timestamp {
  color: var(--gray-400);
  font-weight: 500;
}

.log-level {
  font-weight: bold;
  margin: 0 8px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  text-transform: uppercase;
}

.log-level.DEBUG {
  background-color: rgba(156, 220, 254, 0.2);
  color: #9cdcfe;
}

.log-level.INFO {
  background-color: rgba(78, 201, 176, 0.2);
  color: #4ec9b0;
}

.log-level.WARNING {
  background-color: rgba(220, 220, 170, 0.2);
  color: #dcdcaa;
}

.log-level.ERROR {
  background-color: rgba(244, 135, 113, 0.2);
  color: #f48771;
}

.log-level.CRITICAL {
  background-color: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.log-source {
  color: #569cd6;
  font-weight: 500;
}

.log-message {
  color: inherit;
}

/* 滚动条样式 */
.log-container::-webkit-scrollbar {
  width: 8px;
}

.log-container::-webkit-scrollbar-track {
  background: var(--gray-800);
  border-radius: var(--radius-sm);
}

.log-container::-webkit-scrollbar-thumb {
  background: var(--gray-600);
  border-radius: var(--radius-sm);
  transition: var(--transition-base);
}

.log-container::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Firefox滚动条 */
.log-container {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-600) var(--gray-800);
}

/* 日志管理页面整体样式 */
#logs-section .card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}

#logs-section .card-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  font-weight: 600;
  padding: 20px 24px;
}

#logs-section .card-body {
  padding: 0;
}

/* 日志控制区域 */
#logs-section .form-control,
#logs-section .form-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-base);
  padding: 8px 12px;
  font-size: 14px;
  transition: var(--transition-base);
}

#logs-section .form-control:focus,
#logs-section .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-bg);
}

#logs-section .form-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* 统计信息样式 */
#logs-section .badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-lg);
  font-weight: 500;
}

#logs-section .badge.bg-secondary {
  background: var(--gray-500) !important;
  color: var(--text-white);
}

#logs-section .badge.bg-info {
  background: var(--info-color) !important;
  color: var(--text-white);
}

/* 空状态样式 */
.log-container .text-center {
  padding: 48px 24px;
  color: var(--gray-400);
}

.log-container .text-center i {
  font-size: 48px;
  opacity: 0.6;
  margin-bottom: 16px;
  display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .log-container {
    height: 60vh;
    padding: 12px;
    font-size: 12px;
  }

  .log-entry {
    padding: 1px 0;
  }

  .log-entry:hover {
    padding: 1px 6px;
    margin: 0 -6px;
  }

  .log-level {
    margin: 0 6px;
    padding: 1px 4px;
    font-size: 10px;
  }

  #logs-section .card-header {
    padding: 16px;
  }

  .log-container .text-center {
    padding: 32px 16px;
  }

  .log-container .text-center i {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .log-container {
    height: 50vh;
    padding: 8px;
    font-size: 11px;
  }

  .log-entry.ERROR,
  .log-entry.CRITICAL {
    padding-left: 8px;
    margin-left: -11px;
  }

  .log-level {
    margin: 0 4px;
    padding: 1px 3px;
    font-size: 9px;
  }
}
